<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //创建数组方式一
    var car = new Array();
    car[0] = "BMW";
    car[1] = "BYD";
    car[2] = "Honda";

    //创建数组方式二
    var car2 = new Array(3);
    car2[0] = "BMW";
    car2[1] = "BYD";
    car2[2] = "Honda";

    //创建数组方式三
    var car3 = new Array("BMW", "BYD", "Honda");
</script>
</body>
</html>